package cz.matasek.dbLogger.database;

import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;

/**
 * Enumeration of the supported database platforms.
 *
 * @author Luboš Matásek
 */
public enum DatabasePlatform {

    /**
     * Oracle.
     */
    ORACLE(Oracle.getDatabasePlatformName()),
    /**
     * PostgreSQL.
     */
    POSTGRE_SQL(PostgreSql.getDatabasePlatformName());
    /**
     * Database platform name.
     */
    private final String platformName;

    /** 
     * Creates a new <code>DatabasePlatform</code> object.
     * Sets database platform name.
     *
     * @param platformName database platform name
     */
    private DatabasePlatform(String platformName) {
        this.platformName = platformName;
    }

    /** 
     * Returns string representation of the database platform.
     *
     * @return database platform name
     */
    @Override
    public String toString() {
        return platformName;
    }
}
